﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AcctrueWMS.Foundation.WebControls
{
    public class AccText : AccControl
    {
        public override string Render()
        {
            base.Render();
            StringBuilder sb = new StringBuilder();
            #region 生成控件
            //sb.Append(GenerateDescription());
            sb.Append("<label type='text' ");
            sb.Append(GenerateBasicProperty());
            if (this.Musted)
            {
                Style = "font-size:	9pt;width:90%;height:20px;border:1px solid #7b9ebd;";
                if (!string.IsNullOrEmpty(Style))
                    sb.Append(string.Format("style=\"{0}\"", Style));
                sb.Append(" >");
                sb.Append(GetControlValue());
                sb.Append("</label>");
                sb.Append("<font style='color:red'>*</font>");
            }
            else
            {
                Style = "font-size:	9pt;width:90%;height:20px;border:1px solid #7b9ebd;";
                if (!string.IsNullOrEmpty(Style))
                    sb.Append(string.Format("style=\"{0}\"", Style));
                sb.Append(" >");
                sb.Append(GetControlValue());
                sb.Append("</label>");
            }
            #endregion

            #region 生成脚本
            #endregion
            return sb.ToString();
        }
    }
}
